<template>
  <a-config-provider
    :theme="{
      token: {
        colorPrimary: themeColor,
        borderRadius: 4
      },
      components: {
        Menu: {
          fontSize: 15,
          controlHeightLG: 44,
          itemMarginInline: 6
        }
      }
    }"
  >
    <a-config-provider :locale="locale">
      <div id="app">
        <RouterView />
      </div>
    </a-config-provider>
  </a-config-provider>
</template>
<script setup>
import { RouterView } from 'vue-router'
import { computed } from 'vue'
import useSettingsStore from '@/store/modules/settings'
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-cn')
// 仓库实例化
const settingsStore = useSettingsStore()
// 系统主题
const themeColor = computed(() => {
  return settingsStore.themeColor
})
// 国际化
const locale = computed(() => {
  return zhCN
})
</script>

<style scoped></style>
